﻿<script type="text/javascript">
    function jump(id, name, mediaType, displayDBName) {
        window.location.href = "SingleSearch?id=" + id + "&name=" + escape(name) + "&mediaType=" + mediaType + "&displayDBName=" + escape(displayDBName);
    }
</script>
<div class="wrap">
    <ul class="media-box">
        @if (ViewBag.MediaResource != null && ViewBag.MediaResource.Count > 0)
        {
            int i = -1;
            string type = "";
            foreach (CNKI.TPI.Web.Search.Model.SYS_CMS_PUBLISHTYPE item in ViewBag.MediaResource)
            {
                i++;
                if (item.DatabaseList.Count == 0)
                {
                    continue;
                }
                if (0 == (i % 3))
                {
                    type = "m-b-li";
                }
                else
                {
                    type = "m-b-li" + ((i % 3) + 1).ToString();
                }
            <li class='clearfix'>
               @* <ul class='@type' style="display:table-cell;border: 1px solid #ebebeb;width:150px;font-family: '\5FAE\8F6F\96C5\9ED1'">
                    <li>
                        <h2>@item.Name</h2>
                    </li>
                </ul>*@
                <h2>@Html.Raw("<a style=\"text-decoration:none;cursor:default;\" class='"+type+"'>" + item.Name + "</a>")</h2>
                <ul class='m-b-ul-in clearfix'>
                    @foreach (CNKI.TPI.Web.Search.Model.SYS_CMS_DATABASE item1 in item.DatabaseList)
                    {
                        <li>@Html.Raw("<a href=\"#\" onClick=\"jump('" + item1.SysID + "','" + item1.DatabaseCode + "','" + item.SysID + "','" + item1.DatabaseName + "')\">" + item1.DatabaseName + "</a>")</li>
                    }
                </ul>
            </li>
            }
        }
    </ul>

</div>
